package com.cn.controller;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cn.pojo.TTUser;
import com.cn.service.TTUserService;
  
@Controller
@RequestMapping("/user")
public class TTUserController {
	@Resource
	private TTUserService userService;
 
	@RequestMapping("/index")
	public String queryAll(Model model) {
		List<TTUser> list = userService.queryAll();
		model.addAttribute("USER", list);
		System.out.println(list.size());
		return "index";
	} 
} 
